dynflow 0.8.26 → 0.8.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dynflow.rb +1 -0
- data/lib/dynflow/action/rescue.rb +5 -4
- data/lib/dynflow/actors.rb +5 -0
- data/lib/dynflow/actors/execution_plan_cleaner.rb +57 -0
- data/lib/dynflow/config.rb +4 -0
- data/lib/dynflow/coordinator.rb +11 -0
- data/lib/dynflow/delayed_executors/abstract.rb +6 -6
- data/lib/dynflow/director.rb +15 -6
- data/lib/dynflow/execution_plan.rb +2 -1
- data/lib/dynflow/persistence.rb +6 -0
- data/lib/dynflow/persistence_adapters/sequel.rb +6 -0
- data/lib/dynflow/version.rb +1 -1
- data/lib/dynflow/world.rb +11 -6
- data/test/execution_plan_cleaner_test.rb +79 -0
- data/test/rescue_test.rb +7 -5
- data/test/support/rescue_example.rb +3 -1
- data/web/assets/images/logo-square.png +1 -1
- data/web/views/layout.erb +0 -1
- metadata +7 -7
- data/web/assets/vendor/google-code-prettify/lang-basic.js +0 -3
- data/web/assets/vendor/google-code-prettify/prettify.css +0 -1
- data/web/assets/vendor/google-code-prettify/prettify.js +0 -30
- data/web/assets/vendor/google-code-prettify/run_prettify.js +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c29dae3c108d866f7f1511956fdfb01a2d610cbb
|
4
|
+
data.tar.gz: 3c953876824d3b91eee7f7bd56fd3796dd3f9824
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ccb91b020b89a77461d1524d5a9601fd08675a548dec7f67a3952b30ef0ff265ff3a121824a5142e1aadc19bed8117526589c418b08df1b6d5f24685c08301a
|
7
|
+
data.tar.gz: b0e8cf29ebf1e264fe842eb9d001df942cd5716312e8390c94f68cfc1e5bdd45ce153e033fd2a9f7e856c3175af0a478cd1f55caa355d4becfea944871205900
|
data/lib/dynflow.rb
CHANGED
@@ -21,13 +21,14 @@ module Dynflow
|
|
21
21
|
def rescue_strategy
|
22
22
|
suggested_strategies = []
|
23
23
|
|
24
|
-
if self.steps.compact.any? { |step| step.state == :error }
|
25
|
-
self.steps.compact.all? { |step| [:pending, :success].include? step.state }
|
24
|
+
if self.steps.compact.any? { |step| step.state == :error }
|
26
25
|
suggested_strategies << SuggestedStrategy[self, rescue_strategy_for_self]
|
27
26
|
end
|
28
27
|
|
29
28
|
self.planned_actions.each do |planned_action|
|
30
|
-
|
29
|
+
rescue_strategy = rescue_strategy_for_planned_action(planned_action)
|
30
|
+
next unless rescue_strategy # ignore actions that have no say in the rescue strategy
|
31
|
+
suggested_strategies << SuggestedStrategy[planned_action, rescue_strategy]
|
31
32
|
end
|
32
33
|
|
33
34
|
combine_suggested_strategies(suggested_strategies)
|
@@ -49,7 +50,7 @@ module Dynflow
|
|
49
50
|
# the suggested strategies
|
50
51
|
def combine_suggested_strategies(suggested_strategies)
|
51
52
|
if suggested_strategies.empty?
|
52
|
-
|
53
|
+
nil
|
53
54
|
else
|
54
55
|
# TODO: Find the safest rescue strategy among the suggested ones
|
55
56
|
if suggested_strategies.all? { |suggested_strategy| suggested_strategy.strategy == Skip }
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module Dynflow
|
2
|
+
module Actors
|
3
|
+
class ExecutionPlanCleaner
|
4
|
+
attr_reader :core
|
5
|
+
|
6
|
+
def initialize(world, options = {})
|
7
|
+
@world = world
|
8
|
+
@options = options
|
9
|
+
end
|
10
|
+
|
11
|
+
def core_class
|
12
|
+
Core
|
13
|
+
end
|
14
|
+
|
15
|
+
def spawn
|
16
|
+
Concurrent.future.tap do |initialized|
|
17
|
+
@core = core_class.spawn(:name => 'execution-plan-cleaner',
|
18
|
+
:args => [@world, @options],
|
19
|
+
:initialized => initialized)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def clean!
|
24
|
+
core.tell([:clean!])
|
25
|
+
end
|
26
|
+
|
27
|
+
class Core < Actor
|
28
|
+
def initialize(world, options = {})
|
29
|
+
@world = world
|
30
|
+
default_age = 60 * 60 * 24 # One day by default
|
31
|
+
@poll_interval = options.fetch(:poll_interval, default_age)
|
32
|
+
@max_age = options.fetch(:max_age, default_age)
|
33
|
+
start
|
34
|
+
end
|
35
|
+
|
36
|
+
def start
|
37
|
+
set_clock
|
38
|
+
clean!
|
39
|
+
end
|
40
|
+
|
41
|
+
def clean!
|
42
|
+
plans = @world.persistence.find_old_execution_plans(Time.now.utc - @max_age)
|
43
|
+
report(plans)
|
44
|
+
@world.persistence.delete_execution_plans(uuid: plans.map(&:id))
|
45
|
+
end
|
46
|
+
|
47
|
+
def report(plans)
|
48
|
+
@world.logger.info("Execution plan cleaner removing #{plans.count} execution plans.")
|
49
|
+
end
|
50
|
+
|
51
|
+
def set_clock
|
52
|
+
@world.clock.ping(self, @poll_interval, :start)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/lib/dynflow/config.rb
CHANGED
@@ -107,6 +107,10 @@ module Dynflow
|
|
107
107
|
::Dynflow::ThrottleLimiter.new(world)
|
108
108
|
end
|
109
109
|
|
110
|
+
config_attr :execution_plan_cleaner, ::Dynflow::Actors::ExecutionPlanCleaner, NilClass do |world|
|
111
|
+
nil
|
112
|
+
end
|
113
|
+
|
110
114
|
config_attr :action_classes do
|
111
115
|
Action.all_children
|
112
116
|
end
|
data/lib/dynflow/coordinator.rb
CHANGED
@@ -187,6 +187,17 @@ module Dynflow
|
|
187
187
|
end
|
188
188
|
end
|
189
189
|
|
190
|
+
class ExecutionPlanCleanerLock < LockByWorld
|
191
|
+
def initialize(world)
|
192
|
+
super
|
193
|
+
@data[:id] = self.class.lock_id
|
194
|
+
end
|
195
|
+
|
196
|
+
def self.lock_id
|
197
|
+
"execution-plan-cleaner"
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
190
201
|
class WorldInvalidationLock < LockByWorld
|
191
202
|
def initialize(world, invalidated_world)
|
192
203
|
super(world)
|
@@ -18,12 +18,6 @@ module Dynflow
|
|
18
18
|
@core.ask(:terminate!)
|
19
19
|
end
|
20
20
|
|
21
|
-
private
|
22
|
-
|
23
|
-
def core_class
|
24
|
-
raise NotImplementedError
|
25
|
-
end
|
26
|
-
|
27
21
|
def spawn
|
28
22
|
Concurrent.future.tap do |initialized|
|
29
23
|
@core = core_class.spawn name: 'delayed-executor',
|
@@ -32,6 +26,12 @@ module Dynflow
|
|
32
26
|
end
|
33
27
|
end
|
34
28
|
|
29
|
+
private
|
30
|
+
|
31
|
+
def core_class
|
32
|
+
raise NotImplementedError
|
33
|
+
end
|
34
|
+
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
data/lib/dynflow/director.rb
CHANGED
@@ -80,7 +80,7 @@ module Dynflow
|
|
80
80
|
@world = world
|
81
81
|
@logger = world.logger
|
82
82
|
@execution_plan_managers = {}
|
83
|
-
@
|
83
|
+
@rescued_steps = {}
|
84
84
|
end
|
85
85
|
|
86
86
|
def start_execution(execution_plan_id, finished)
|
@@ -145,15 +145,24 @@ module Dynflow
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def rescue?(manager)
|
148
|
-
|
149
|
-
|
150
|
-
|
148
|
+
if @world.terminating? || !(@world.auto_rescue && manager.execution_plan.state == :paused)
|
149
|
+
false
|
150
|
+
elsif !@rescued_steps.key?(manager.execution_plan.id)
|
151
|
+
# we have not rescued this plan yet
|
152
|
+
true
|
153
|
+
else
|
154
|
+
# we have rescued this plan already, but a different step has failed now
|
155
|
+
# we do this check to prevent endless loop, if we always failed on the same steps
|
156
|
+
failed_step_ids = manager.execution_plan.failed_steps.map(&:id).to_set
|
157
|
+
(failed_step_ids - @rescued_steps[manager.execution_plan.id]).any?
|
158
|
+
end
|
151
159
|
end
|
152
160
|
|
153
161
|
def rescue!(manager)
|
154
162
|
# TODO: after moving to concurrent-ruby actors, there should be better place
|
155
163
|
# to put this logic of making sure we don't run rescues in endless loop
|
156
|
-
@
|
164
|
+
@rescued_steps[manager.execution_plan.id] ||= Set.new
|
165
|
+
@rescued_steps[manager.execution_plan.id].merge(manager.execution_plan.failed_steps.map(&:id))
|
157
166
|
rescue_plan_id = manager.execution_plan.rescue_plan_id
|
158
167
|
if rescue_plan_id
|
159
168
|
@world.executor.execute(rescue_plan_id, manager.future, false)
|
@@ -183,7 +192,7 @@ module Dynflow
|
|
183
192
|
end
|
184
193
|
|
185
194
|
def set_future(manager)
|
186
|
-
@
|
195
|
+
@rescued_steps.delete(manager.execution_plan.id)
|
187
196
|
manager.future.success manager.execution_plan
|
188
197
|
end
|
189
198
|
end
|
@@ -151,7 +151,8 @@ module Dynflow
|
|
151
151
|
end
|
152
152
|
|
153
153
|
def rescue_strategy
|
154
|
-
|
154
|
+
rescue_strategy = entry_action.rescue_strategy || Action::Rescue::Skip
|
155
|
+
Type! rescue_strategy, Action::Rescue::Strategy
|
155
156
|
end
|
156
157
|
|
157
158
|
def sub_plans
|
data/lib/dynflow/persistence.rb
CHANGED
@@ -58,6 +58,12 @@ module Dynflow
|
|
58
58
|
adapter.save_execution_plan(execution_plan.id, execution_plan.to_hash)
|
59
59
|
end
|
60
60
|
|
61
|
+
def find_old_execution_plans(age)
|
62
|
+
adapter.find_old_execution_plans(age).map do |plan|
|
63
|
+
ExecutionPlan.new_from_hash(plan, @world)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
61
67
|
def find_past_delayed_plans(time)
|
62
68
|
adapter.find_past_delayed_plans(time).map do |plan|
|
63
69
|
DelayedPlan.new_from_hash(@world, plan)
|
@@ -102,6 +102,12 @@ module Dynflow
|
|
102
102
|
count
|
103
103
|
end
|
104
104
|
|
105
|
+
def find_old_execution_plans(age)
|
106
|
+
table(:execution_plan)
|
107
|
+
.where(::Sequel.lit('ended_at <= ? AND state = ?', age, 'stopped'))
|
108
|
+
.all.map { |plan| load_data plan }
|
109
|
+
end
|
110
|
+
|
105
111
|
def find_past_delayed_plans(time)
|
106
112
|
table(:delayed)
|
107
113
|
.where(::Sequel.lit('start_at <= ? OR (start_before IS NOT NULL AND start_before <= ?)', time, time))
|
data/lib/dynflow/version.rb
CHANGED
data/lib/dynflow/world.rb
CHANGED
@@ -8,7 +8,7 @@ module Dynflow
|
|
8
8
|
:transaction_adapter, :logger_adapter, :coordinator,
|
9
9
|
:persistence, :action_classes, :subscription_index,
|
10
10
|
:middleware, :auto_rescue, :clock, :meta, :delayed_executor, :auto_validity_check, :validity_check_timeout, :throttle_limiter,
|
11
|
-
:terminated
|
11
|
+
:terminated, :execution_plan_cleaner
|
12
12
|
|
13
13
|
def initialize(config)
|
14
14
|
@id = SecureRandom.uuid
|
@@ -44,9 +44,11 @@ module Dynflow
|
|
44
44
|
self.worlds_validity_check
|
45
45
|
self.locks_validity_check
|
46
46
|
end
|
47
|
-
@delayed_executor =
|
47
|
+
@delayed_executor = try_spawn(config_for_world, :delayed_executor, Coordinator::DelayedExecutorLock)
|
48
|
+
@execution_plan_cleaner = try_spawn(config_for_world, :execution_plan_cleaner, Coordinator::ExecutionPlanCleanerLock)
|
48
49
|
@meta = config_for_world.meta
|
49
50
|
@meta['delayed_executor'] = true if @delayed_executor
|
51
|
+
@meta['execution_plan_cleaner'] = true if @execution_plan_cleaner
|
50
52
|
coordinator.register_world(registered_world)
|
51
53
|
@termination_barrier = Mutex.new
|
52
54
|
@before_termination_hooks = Queue.new
|
@@ -389,10 +391,13 @@ module Dynflow
|
|
389
391
|
[]
|
390
392
|
end
|
391
393
|
|
392
|
-
def
|
393
|
-
|
394
|
-
|
395
|
-
|
394
|
+
def try_spawn(config_for_world, what, lock_class = nil)
|
395
|
+
object = nil
|
396
|
+
return nil if !executor || (object = config_for_world.public_send(what)).nil?
|
397
|
+
|
398
|
+
coordinator.acquire(lock_class.new(self)) if lock_class
|
399
|
+
object.spawn.wait
|
400
|
+
object
|
396
401
|
rescue Coordinator::LockError => e
|
397
402
|
nil
|
398
403
|
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
require_relative 'test_helper'
|
2
|
+
require 'mocha/mini_test'
|
3
|
+
|
4
|
+
module Dynflow
|
5
|
+
module ExecutionPlanCleanerTest
|
6
|
+
describe ::Dynflow::Actors::ExecutionPlanCleaner do
|
7
|
+
include Dynflow::Testing::Assertions
|
8
|
+
include Dynflow::Testing::Factories
|
9
|
+
include TestHelpers
|
10
|
+
|
11
|
+
class SimpleAction < ::Dynflow::Action
|
12
|
+
def plan; end
|
13
|
+
end
|
14
|
+
|
15
|
+
before do
|
16
|
+
world.persistence.delete_execution_plans({})
|
17
|
+
end
|
18
|
+
|
19
|
+
let(:default_world) { WorldFactory.create_world }
|
20
|
+
let(:age) { 10 }
|
21
|
+
let(:world) do
|
22
|
+
WorldFactory.create_world do |config|
|
23
|
+
config.execution_plan_cleaner = proc do |world|
|
24
|
+
::Dynflow::Actors::ExecutionPlanCleaner.new(world, :max_age => age)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
let(:clock) { Testing::ManagedClock.new }
|
29
|
+
|
30
|
+
it 'is disabled by default' do
|
31
|
+
default_world.execution_plan_cleaner.must_be_nil
|
32
|
+
world.execution_plan_cleaner
|
33
|
+
.must_be_instance_of ::Dynflow::Actors::ExecutionPlanCleaner
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'periodically looks for old execution plans' do
|
37
|
+
world.stub(:clock, clock) do
|
38
|
+
clock.pending_pings.count.must_equal 0
|
39
|
+
world.execution_plan_cleaner.core.ask!(:start)
|
40
|
+
clock.pending_pings.count.must_equal 1
|
41
|
+
world.persistence.expects(:find_old_execution_plans).returns([])
|
42
|
+
world.persistence.expects(:delete_execution_plans).with(:uuid => [])
|
43
|
+
clock.progress
|
44
|
+
wait_for { clock.pending_pings.count == 1 }
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'cleans up old plans' do
|
49
|
+
world.stub(:clock, clock) do
|
50
|
+
world.execution_plan_cleaner.core.ask!(:start)
|
51
|
+
clock.pending_pings.count.must_equal 1
|
52
|
+
plans = (1..10).map { world.trigger SimpleAction }
|
53
|
+
.each { |plan| plan.finished.wait }
|
54
|
+
world.persistence.find_execution_plans(:uuid => plans.map(&:id))
|
55
|
+
.each do |plan|
|
56
|
+
plan.instance_variable_set(:@ended_at, plan.ended_at - 15)
|
57
|
+
plan.save
|
58
|
+
end
|
59
|
+
world.execution_plan_cleaner.core.ask!(:clean!)
|
60
|
+
world.persistence.find_execution_plans(:uuid => plans.map(&:id))
|
61
|
+
.count.must_equal 0
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'leaves "new enough" plans intact' do
|
66
|
+
world.stub(:clock, clock) do
|
67
|
+
count = 10
|
68
|
+
world.execution_plan_cleaner.core.ask!(:start)
|
69
|
+
clock.pending_pings.count.must_equal 1
|
70
|
+
plans = (1..10).map { world.trigger SimpleAction }
|
71
|
+
.each { |plan| plan.finished.wait }
|
72
|
+
world.execution_plan_cleaner.core.ask!(:clean!)
|
73
|
+
world.persistence.find_execution_plans(:uuid => plans.map(&:id))
|
74
|
+
.count.must_equal count
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
data/test/rescue_test.rb
CHANGED
@@ -34,7 +34,6 @@ module Dynflow
|
|
34
34
|
rescued_plan.entry_action.output[:message].
|
35
35
|
must_equal "skipped because some error as you wish"
|
36
36
|
end
|
37
|
-
|
38
37
|
end
|
39
38
|
|
40
39
|
describe 'of simple skippable action in finalize phase' do
|
@@ -87,6 +86,9 @@ module Dynflow
|
|
87
86
|
end
|
88
87
|
|
89
88
|
it 'skips the action and continues' do
|
89
|
+
# we need to rescue twice for two errors in sequence
|
90
|
+
rescued_plan = execution_plan.rescue_from_error.value
|
91
|
+
rescued_plan = rescued_plan.rescue_from_error.value
|
90
92
|
rescued_plan.state.must_equal :stopped
|
91
93
|
rescued_plan.result.must_equal :warning
|
92
94
|
skipped_action = rescued_plan.actions.find do |action|
|
@@ -127,8 +129,8 @@ module Dynflow
|
|
127
129
|
proc { rescued_plan }.must_raise Errors::RescueError
|
128
130
|
execution_plan.state.must_equal :stopped
|
129
131
|
execution_plan.result.must_equal :error
|
130
|
-
execution_plan.steps_in_state(:success).count.must_equal
|
131
|
-
execution_plan.steps_in_state(:pending).count.must_equal
|
132
|
+
execution_plan.steps_in_state(:success).count.must_equal 6
|
133
|
+
execution_plan.steps_in_state(:pending).count.must_equal 6
|
132
134
|
execution_plan.steps_in_state(:error).count.must_equal 1
|
133
135
|
end
|
134
136
|
|
@@ -190,8 +192,8 @@ module Dynflow
|
|
190
192
|
it 'fails the execution plan automatically' do
|
191
193
|
execution_plan.state.must_equal :stopped
|
192
194
|
execution_plan.result.must_equal :error
|
193
|
-
execution_plan.steps_in_state(:success).count.must_equal
|
194
|
-
execution_plan.steps_in_state(:pending).count.must_equal
|
195
|
+
execution_plan.steps_in_state(:success).count.must_equal 6
|
196
|
+
execution_plan.steps_in_state(:pending).count.must_equal 6
|
195
197
|
execution_plan.steps_in_state(:error).count.must_equal 1
|
196
198
|
end
|
197
199
|
end
|
@@ -10,8 +10,9 @@ module Support
|
|
10
10
|
concurrence do
|
11
11
|
plan_action(ActionWithSkip, 3, :success)
|
12
12
|
plan_action(ActionWithSkip, 4, error_state)
|
13
|
+
plan_action(ActionWithSkip, 5, error_state)
|
13
14
|
end
|
14
|
-
plan_action(ActionWithSkip,
|
15
|
+
plan_action(ActionWithSkip, 6, :success)
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
@@ -92,6 +93,7 @@ module Support
|
|
92
93
|
plan_action(ActionWithFail, 4, error_state)
|
93
94
|
end
|
94
95
|
plan_action(ActionWithFail, 5, :success)
|
96
|
+
plan_action(ActionWithSkip, 6, :success)
|
95
97
|
end
|
96
98
|
end
|
97
99
|
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../../doc/pages/source/images/logo-square.png
|
data/web/views/layout.erb
CHANGED
@@ -12,7 +12,6 @@
|
|
12
12
|
|
13
13
|
<script src="<%= url '/vendor/jquery/jquery.js' %>"></script>
|
14
14
|
<script src="<%= url '/vendor/bootstrap/js/bootstrap.js' %>"></script>
|
15
|
-
<script src="<%= url '/vendor/google-code-prettify/run_prettify.js' %>"></script>
|
16
15
|
<script src="<%= url '/javascripts/application.js' %>"></script>
|
17
16
|
</head>
|
18
17
|
<body>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Necas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-08-
|
12
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -394,6 +394,8 @@ files:
|
|
394
394
|
- lib/dynflow/action/with_sub_plans.rb
|
395
395
|
- lib/dynflow/active_job/queue_adapter.rb
|
396
396
|
- lib/dynflow/actor.rb
|
397
|
+
- lib/dynflow/actors.rb
|
398
|
+
- lib/dynflow/actors/execution_plan_cleaner.rb
|
397
399
|
- lib/dynflow/clock.rb
|
398
400
|
- lib/dynflow/config.rb
|
399
401
|
- lib/dynflow/connectors.rb
|
@@ -522,6 +524,7 @@ files:
|
|
522
524
|
- test/coordinator_test.rb
|
523
525
|
- test/daemon_test.rb
|
524
526
|
- test/dispatcher_test.rb
|
527
|
+
- test/execution_plan_cleaner_test.rb
|
525
528
|
- test/execution_plan_test.rb
|
526
529
|
- test/executor_test.rb
|
527
530
|
- test/future_execution_test.rb
|
@@ -557,10 +560,6 @@ files:
|
|
557
560
|
- web/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2
|
558
561
|
- web/assets/vendor/bootstrap/js/bootstrap.js
|
559
562
|
- web/assets/vendor/bootstrap/js/bootstrap.min.js
|
560
|
-
- web/assets/vendor/google-code-prettify/lang-basic.js
|
561
|
-
- web/assets/vendor/google-code-prettify/prettify.css
|
562
|
-
- web/assets/vendor/google-code-prettify/prettify.js
|
563
|
-
- web/assets/vendor/google-code-prettify/run_prettify.js
|
564
563
|
- web/assets/vendor/jquery/jquery.js
|
565
564
|
- web/views/execution_history.erb
|
566
565
|
- web/views/flow.erb
|
@@ -590,7 +589,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
590
589
|
version: '0'
|
591
590
|
requirements: []
|
592
591
|
rubyforge_project:
|
593
|
-
rubygems_version: 2.
|
592
|
+
rubygems_version: 2.5.1
|
594
593
|
signing_key:
|
595
594
|
specification_version: 4
|
596
595
|
summary: DYNamic workFLOW engine
|
@@ -604,6 +603,7 @@ test_files:
|
|
604
603
|
- test/coordinator_test.rb
|
605
604
|
- test/daemon_test.rb
|
606
605
|
- test/dispatcher_test.rb
|
606
|
+
- test/execution_plan_cleaner_test.rb
|
607
607
|
- test/execution_plan_test.rb
|
608
608
|
- test/executor_test.rb
|
609
609
|
- test/future_execution_test.rb
|
@@ -1,3 +0,0 @@
|
|
1
|
-
var a=null;
|
2
|
-
PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\r"\\]|\\.)*(?:"|$)/,a,'"'],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^REM[^\n\r]*/,a],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,a],["pln",/^[a-z][^\W_]?(?:\$|%)?/i,a],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i,a,"0123456789"],["pun",
|
3
|
-
/^.[^\s\w"$%.]*/,a]]),["basic","cbm"]);
|
@@ -1 +0,0 @@
|
|
1
|
-
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
2
|
-
(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
|
3
|
-
b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
|
4
|
-
h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
|
5
|
-
(a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
|
6
|
-
f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=
|
7
|
-
a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)];
|
8
|
-
if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=
|
9
|
-
g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
10
|
-
q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
|
11
|
-
/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
|
12
|
-
s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
|
13
|
-
q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
|
14
|
-
c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol");
|
15
|
-
r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
|
16
|
-
a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,
|
17
|
-
t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
18
|
-
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
|
19
|
-
O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
20
|
-
Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
|
21
|
-
V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
|
22
|
-
/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
|
23
|
-
["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),
|
24
|
-
["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,
|
25
|
-
hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
|
26
|
-
p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
|
27
|
-
return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&
|
28
|
-
o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=
|
29
|
-
{h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,
|
30
|
-
h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}()
|
@@ -1,34 +0,0 @@
|
|
1
|
-
!function(){var r=null;
|
2
|
-
(function(){function X(e){function j(){try{J.doScroll("left")}catch(e){P(j,50);return}w("poll")}function w(j){if(!(j.type=="readystatechange"&&x.readyState!="complete")&&((j.type=="load"?n:x)[z](i+j.type,w,!1),!m&&(m=!0)))e.call(n,j.type||j)}var Y=x.addEventListener,m=!1,C=!0,t=Y?"addEventListener":"attachEvent",z=Y?"removeEventListener":"detachEvent",i=Y?"":"on";if(x.readyState=="complete")e.call(n,"lazy");else{if(x.createEventObject&&J.doScroll){try{C=!n.frameElement}catch(A){}C&&j()}x[t](i+"DOMContentLoaded",
|
3
|
-
w,!1);x[t](i+"readystatechange",w,!1);n[t](i+"load",w,!1)}}function Q(){S&&X(function(){var e=K.length;$(e?function(){for(var j=0;j<e;++j)(function(e){P(function(){n.exports[K[e]].apply(n,arguments)},0)})(j)}:void 0)})}for(var n=window,P=n.setTimeout,x=document,J=x.documentElement,L=x.head||x.getElementsByTagName("head")[0]||J,z="",A=x.scripts,m=A.length;--m>=0;){var M=A[m],T=M.src.match(/^[^#?]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);if(T){z=T[1]||"";M.parentNode.removeChild(M);break}}var S=!0,D=
|
4
|
-
[],N=[],K=[];z.replace(/[&?]([^&=]+)=([^&]+)/g,function(e,j,w){w=decodeURIComponent(w);j=decodeURIComponent(j);j=="autorun"?S=!/^[0fn]/i.test(w):j=="lang"?D.push(w):j=="skin"?N.push(w):j=="callback"&&K.push(w)});m=0;for(z=D.length;m<z;++m)(function(){var e=x.createElement("script");e.onload=e.onerror=e.onreadystatechange=function(){if(e&&(!e.readyState||/loaded|complete/.test(e.readyState)))e.onerror=e.onload=e.onreadystatechange=r,--R,R||P(Q,0),e.parentNode&&e.parentNode.removeChild(e),e=r};e.type=
|
5
|
-
"text/javascript";e.src="https://google-code-prettify.googlecode.com/svn/loader/lang-"+encodeURIComponent(D[m])+".js";L.insertBefore(e,L.firstChild)})(D[m]);for(var R=D.length,A=[],m=0,z=N.length;m<z;++m)A.push("https://google-code-prettify.googlecode.com/svn/loader/skins/"+encodeURIComponent(N[m])+".css");A.push("https://google-code-prettify.googlecode.com/svn/loader/prettify.css");(function(e){function j(m){if(m!==w){var n=x.createElement("link");n.rel="stylesheet";n.type="text/css";if(m+1<w)n.error=
|
6
|
-
n.onerror=function(){j(m+1)};n.href=e[m];L.appendChild(n)}}var w=e.length;j(0)})(A);var $=function(){window.PR_SHOULD_USE_CONTINUATION=!0;var e;(function(){function j(a){function d(f){var b=f.charCodeAt(0);if(b!==92)return b;var a=f.charAt(1);return(b=i[a])?b:"0"<=a&&a<="7"?parseInt(f.substring(1),8):a==="u"||a==="x"?parseInt(f.substring(2),16):f.charCodeAt(1)}function h(f){if(f<32)return(f<16?"\\x0":"\\x")+f.toString(16);f=String.fromCharCode(f);return f==="\\"||f==="-"||f==="]"||f==="^"?"\\"+f:
|
7
|
-
f}function b(f){var b=f.substring(1,f.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),f=[],a=b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,g=b.length;a<g;++a){var k=b[a];if(/\\[bdsw]/i.test(k))c.push(k);else{var k=d(k),o;a+2<g&&"-"===b[a+1]?(o=d(b[a+2]),a+=2):o=k;f.push([k,o]);o<65||k>122||(o<65||k>90||f.push([Math.max(65,k)|32,Math.min(o,90)|32]),o<97||k>122||f.push([Math.max(97,k)&-33,Math.min(o,122)&-33]))}}f.sort(function(f,a){return f[0]-
|
8
|
-
a[0]||a[1]-f[1]});b=[];g=[];for(a=0;a<f.length;++a)k=f[a],k[0]<=g[1]+1?g[1]=Math.max(g[1],k[1]):b.push(g=k);for(a=0;a<b.length;++a)k=b[a],c.push(h(k[0])),k[1]>k[0]&&(k[1]+1>k[0]&&c.push("-"),c.push(h(k[1])));c.push("]");return c.join("")}function e(f){for(var a=f.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],g=0,k=0;g<c;++g){var o=a[g];o==="("?++k:"\\"===o.charAt(0)&&(o=+o.substring(1))&&(o<=k?d[o]=-1:a[g]=h(o))}for(g=
|
9
|
-
1;g<d.length;++g)-1===d[g]&&(d[g]=++j);for(k=g=0;g<c;++g)o=a[g],o==="("?(++k,d[k]||(a[g]="(?:")):"\\"===o.charAt(0)&&(o=+o.substring(1))&&o<=k&&(a[g]="\\"+d[o]);for(g=0;g<c;++g)"^"===a[g]&&"^"!==a[g+1]&&(a[g]="");if(f.ignoreCase&&F)for(g=0;g<c;++g)o=a[g],f=o.charAt(0),o.length>=2&&f==="["?a[g]=b(o):f!=="\\"&&(a[g]=o.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var j=0,F=!1,l=!1,I=0,c=a.length;I<c;++I){var p=a[I];if(p.ignoreCase)l=
|
10
|
-
!0;else if(/[a-z]/i.test(p.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){F=!0;l=!1;break}}for(var i={b:8,t:9,n:10,v:11,f:12,r:13},q=[],I=0,c=a.length;I<c;++I){p=a[I];if(p.global||p.multiline)throw Error(""+p);q.push("(?:"+e(p)+")")}return RegExp(q.join("|"),l?"gi":"g")}function m(a,d){function h(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)h(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)e[l]="\n",F[l<<1]=j++,F[l++<<1|1]=a}}else if(c==
|
11
|
-
3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),e[l]=c,F[l<<1]=j,j+=c.length,F[l++<<1|1]=a)}var b=/(?:^|\s)nocode(?:\s|$)/,e=[],j=0,F=[],l=0;h(a);return{a:e.join("").replace(/\n$/,""),d:F}}function n(a,d,h,b){d&&(a={a:d,e:a},h(a),b.push.apply(b,a.g))}function x(a){for(var d=void 0,h=a.firstChild;h;h=h.nextSibling)var b=h.nodeType,d=b===1?d?a:h:b===3?S.test(h.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function h(a){for(var l=a.e,j=[l,"pln"],c=
|
12
|
-
0,p=a.a.match(e)||[],m={},q=0,f=p.length;q<f;++q){var B=p[q],y=m[B],u=void 0,g;if(typeof y==="string")g=!1;else{var k=b[B.charAt(0)];if(k)u=B.match(k[1]),y=k[0];else{for(g=0;g<i;++g)if(k=d[g],u=B.match(k[1])){y=k[0];break}u||(y="pln")}if((g=y.length>=5&&"lang-"===y.substring(0,5))&&!(u&&typeof u[1]==="string"))g=!1,y="src";g||(m[B]=y)}k=c;c+=B.length;if(g){g=u[1];var o=B.indexOf(g),H=o+g.length;u[2]&&(H=B.length-u[2].length,o=H-g.length);y=y.substring(5);n(l+k,B.substring(0,o),h,j);n(l+k+o,g,A(y,
|
13
|
-
g),j);n(l+k+H,B.substring(H),h,j)}else j.push(l+k,y)}a.g=j}var b={},e;(function(){for(var h=a.concat(d),l=[],i={},c=0,p=h.length;c<p;++c){var m=h[c],q=m[3];if(q)for(var f=q.length;--f>=0;)b[q.charAt(f)]=m;m=m[1];q=""+m;i.hasOwnProperty(q)||(l.push(m),i[q]=r)}l.push(/[\S\s]/);e=j(l)})();var i=d.length;return h}function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,
|
14
|
-
r,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,r,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,r,"\"'"]);a.verbatimStrings&&h.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,r]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,r,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,
|
15
|
-
r,"#"]),h.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,r])):d.push(["com",/^#[^\n\r]*/,r,"#"]));a.cStyleComments&&(h.push(["com",/^\/\/[^\n\r]*/,r]),h.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,r]));if(b=a.regexLiterals){var e=(b=b>1?"":"\n\r")?".":"[\\S\\s]";h.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+
|
16
|
-
("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+e+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+e+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&h.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&h.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),r]);d.push(["pln",/^\s+/,r," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");h.push(["lit",/^@[$_a-z][\w$@]*/i,r],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,r],["pln",/^[$_a-z][\w$@]*/i,r],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,
|
17
|
-
r,"0123456789"],["pln",/^\\[\S\s]?/,r],["pun",RegExp(b),r]);return C(d,h)}function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.className))if("br"===a.nodeName)e(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&h){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(l.createTextNode(d),a.nextSibling),e(a),c||a.parentNode.removeChild(a)}}
|
18
|
-
function e(a){function b(a,c){var d=c?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),h=a.nextSibling;f.appendChild(d);for(var e=h;e;e=h)h=e.nextSibling,f.appendChild(e)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var j=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,l=a.ownerDocument,i=l.createElement("li");a.firstChild;)i.appendChild(a.firstChild);for(var c=[i],p=0;p<c.length;++p)b(c[p]);d===(d|0)&&c[0].setAttribute("value",
|
19
|
-
d);var n=l.createElement("ol");n.className="linenums";for(var d=Math.max(0,d-1|0)||0,p=0,q=c.length;p<q;++p)i=c[p],i.className="L"+(p+d)%10,i.firstChild||i.appendChild(l.createTextNode("\u00a0")),n.appendChild(i);a.appendChild(n)}function i(a,d){for(var h=d.length;--h>=0;){var b=d[h];U.hasOwnProperty(b)?V.console&&console.warn("cannot override language handler %s",b):U[b]=a}}function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return U[a]}function D(a){var d=
|
20
|
-
a.h;try{var h=m(a.c,a.i),b=h.a;a.a=b;a.d=h.d;a.e=0;A(d,b)(a);var e=/\bMSIE\s(\d+)/.exec(navigator.userAgent),e=e&&+e[1]<=8,d=/\n/g,i=a.a,j=i.length,h=0,l=a.d,n=l.length,b=0,c=a.g,p=c.length,t=0;c[p]=j;var q,f;for(f=q=0;f<p;)c[f]!==c[f+2]?(c[q++]=c[f++],c[q++]=c[f++]):f+=2;p=q;for(f=q=0;f<p;){for(var x=c[f],y=c[f+1],u=f+2;u+2<=p&&c[u+1]===y;)u+=2;c[q++]=x;c[q++]=y;f=u}c.length=q;var g=a.c,k;if(g)k=g.style.display,g.style.display="none";try{for(;b<n;){var o=l[b+2]||j,H=c[t+2]||j,u=Math.min(o,H),E=l[b+
|
21
|
-
1],W;if(E.nodeType!==1&&(W=i.substring(h,u))){e&&(W=W.replace(d,"\r"));E.nodeValue=W;var Z=E.ownerDocument,s=Z.createElement("span");s.className=c[t+1];var z=E.parentNode;z.replaceChild(s,E);s.appendChild(E);h<o&&(l[b+1]=E=Z.createTextNode(i.substring(u,o)),z.insertBefore(E,s.nextSibling))}h=u;h>=o&&(b+=2);h>=H&&(t+=2)}}finally{if(g)g.style.display=k}}catch(v){V.console&&console.log(v&&v.stack||v)}}var V=window,G=["break,continue,do,else,for,if,return,while"],O=[[G,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
22
|
-
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],J=[O,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],K=[O,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
|
23
|
-
L=[K,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],O=[O,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],M=[G,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
24
|
-
N=[G,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],R=[G,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],G=[G,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
|
25
|
-
S=/\S/,T=t({keywords:[J,L,O,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",M,N,G],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};i(T,["default-code"]);i(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
|
26
|
-
/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);i(C([["pln",/^\s+/,r," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,r,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
|
27
|
-
["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);i(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);i(t({keywords:J,hashComments:!0,cStyleComments:!0,types:Q}),["c","cc","cpp","cxx","cyc","m"]);i(t({keywords:"null,true,false"}),["json"]);i(t({keywords:L,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Q}),
|
28
|
-
["cs"]);i(t({keywords:K,cStyleComments:!0}),["java"]);i(t({keywords:G,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);i(t({keywords:M,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);i(t({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);i(t({keywords:N,
|
29
|
-
hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);i(t({keywords:O,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);i(t({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);i(t({keywords:R,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
|
30
|
-
i(C([],[["str",/^[\S\s]+/]]),["regex"]);var X=V.PR={createSimpleLexer:C,registerLangHandler:i,sourceDecorator:t,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:function(a,d,e){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;e&&z(b,e,!0);D({h:d,j:e,c:b,i:1});return b.innerHTML},
|
31
|
-
prettyPrint:e=e=function(a,d){function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p<j.length&&c.now()<b;p++){for(var d=j[p],m=k,l=d;l=l.previousSibling;){var n=l.nodeType,s=(n===7||n===8)&&l.nodeValue;if(s?!/^\??prettify\b/.test(s):n!==3||/\S/.test(l.nodeValue))break;if(s){m={};s.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){m[b]=c});break}}l=d.className;if((m!==k||f.test(l))&&!w.test(l)){n=!1;for(s=d.parentNode;s;s=s.parentNode)if(g.test(s.tagName)&&s.className&&f.test(s.className)){n=
|
32
|
-
!0;break}if(!n){d.className+=" prettyprinted";n=m.lang;if(!n){var n=l.match(q),A;if(!n&&(A=x(d))&&u.test(A.tagName))n=A.className.match(q);n&&(n=n[1])}if(y.test(d.tagName))s=1;else var s=d.currentStyle,v=i.defaultView,s=(s=s?s.whiteSpace:v&&v.getComputedStyle?v.getComputedStyle(d,r).getPropertyValue("white-space"):0)&&"pre"===s.substring(0,3);v=m.linenums;if(!(v=v==="true"||+v))v=(v=l.match(/\blinenums\b(?::(\d+))?/))?v[1]&&v[1].length?+v[1]:!0:!1;v&&z(d,v,s);t={h:n,c:d,j:v,i:s};D(t)}}}p<j.length?
|
33
|
-
P(e,250):"function"===typeof a&&a()}for(var b=d||document.body,i=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],j=[],m=0;m<b.length;++m)for(var l=0,n=b[m].length;l<n;++l)j.push(b[m][l]);var b=r,c=Date;c.now||(c={now:function(){return+new Date}});var p=0,t,q=/\blang(?:uage)?-([\w.]+)(?!\S)/,f=/\bprettyprint\b/,w=/\bprettyprinted\b/,y=/pre|xmp/i,u=/^code$/i,g=/^(?:pre|code|xmp)$/i,k={};e()}};typeof define==="function"&&define.amd&&
|
34
|
-
define("google-code-prettify",[],function(){return X})})();return e}();R||P(Q,0)})();}()
|